<?php session_start();?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>GradeGrid - Edit School</title>
</head>
<?php
	include("fetchData.php");
	$data=fetchSchoolDetails($_GET['school_id']);
?>
<body>
	<h2>Edit School</h2>
    <form action="modifySchool.php?school_id=<?php echo $_GET['school_id'];?>" method="post">
    	<table>
        	<tr>
            	<td>School Name <sup style="font-size:11px">REQUIRED</sup></td>
                <td><input name="school" type="text" value="<?php echo $data['school_name'];?>"></td>
            </tr>
        </table>
        <table>
            <tr>
                <td><li>College:</li></td>
                <td><input type="text" name="college" value="<?php echo $data['college_name'];?>"></td>
            </tr>
            <tr>
                <td><li>College Dean:</li></td>
                <td><input type="text" name="dean" value="<?php echo $data['dean'];?>"></td>
            </tr>
            <tr>
                <td><li>College Secretary:</li></td>
                <td><input type="text" name="colSec" value="<?php echo $data['college_secretary'];?>"></td>
            </tr>
            <tr>
                <td><li>Department:</li></td>
                <td><input type="text" name="dept" value="<?php echo $data['department_name'];?>"></td>
            </tr>
            <tr>
                <td><li>Department Chair:</li></td>
                <td><input type="text" name="deptChair" value="<?php echo $data['department_chair'];?>"></td>
            </tr>
            <tr>
                <td><li>Country:</li></td>
                <td><input type="text" name="country" value="<?php echo $data['country'];?>"></td>
            </tr>
            <tr>
                <td><li>City:</li></td>
                <td><input type="text" name="city" value="<?php echo $data['city_province'];?>"></td>
            </tr>
            <tr>
                <td><li>Zip Code:</li></td>
                <td><input type="text" name="zip" value="<?php echo $data['zip_code'];?>"></td>
            </tr>
            <tr>
                <td><li>Municipality:</li></td>
                <td><input type="text" name="municipality" value="<?php echo $data['municipality'];?>"></td>
            </tr>
            <tr>
                <td><li>Street:</li></td>
                <td><input type="text" name="street" value="<?php echo $data['street'];?>"></td>
            </tr>
            <tr>
                <td><li>Contact Number:</li></td>
                <td><input type="text" name="num1" value="<?php echo $data['contact_info_1'];?>"></td>
            </tr>
            <tr>
                <td><li>Alternate Contact Number 1:</li></td>
                <td><input type="text" name="num2" value="<?php echo $data['contact_info_2'];?>"></td>
            </tr>
            <tr>
                <td><li>Alternate Contact Number 2:</li></td>
                <td><input type="text" name="num3" value="<?php echo $data['contact_info_3'];?>"></td>
            </tr>
            <tr>
                <td><li>School President:</li></td>
                <td><input type="text" name="pres" value="<?php echo $data['president'];?>"></td>
            </tr>
            <tr>
                <td><li>School Principal:</li></td>
                <td><input type="text" name="prin" value="<?php echo $data['principal'];?>"></td>
            </tr>
            <tr>
                <td><li>School Description:</li></td>
                <td rowspan="2"><textarea name="desc"><?php echo $data['description'];?></textarea></td>
            </tr>
        </table>
        <input type="submit" value="Save">
    </form>
    <div style="font-size:9px; width:100%" align="center">GradeGrid Copyright</div>
	<?php mysql_close();?>
</body>
</html>